import request from "@/router/axios";
import { baseUrl } from "@/config/env";

//查询设备
export const getupkeeplist = (data) =>
  request({
    url: baseUrl + "/api/upkeep",
    method: "get",
    params: data,
  });

export const addupkeep = (list) =>
  request({
    url: baseUrl + "/api/upkeep",
    method: "post",
    data: list,
  });
// 修改用户
export const eidupkeep = (list) =>
  request({
    url: baseUrl + "/api/upkeep",
    method: "put",
    data: list,
  });
// 删除用户
export const dlefacility = (list) =>
  request({
    url: baseUrl + "/api/facility",
    method: "delete",
    data: list,
  });
// 查询角色
export const rolesAll = () =>
  request({
    url: baseUrl + "/api/roles/all",
    method: "get",
  });
export const upkeepInit = (data) =>
  request({
    url: baseUrl + "/api/upkeep/init",
    method: "get",
    params: data,
  });
